<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html 
     PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>Class: ActiveScaffold::Config::List::UserSettings</title>
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
  <meta http-equiv="Content-Script-Type" content="text/javascript" />
  <link rel="stylesheet" href="../../../.././rdoc-style.css" type="text/css" media="screen" />
  <script type="text/javascript">
  // <![CDATA[

  function popupCode( url ) {
    window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
  }

  function toggleCode( id ) {
    if ( document.getElementById )
      elem = document.getElementById( id );
    else if ( document.all )
      elem = eval( "document.all." + id );
    else
      return false;

    elemStyle = elem.style;
    
    if ( elemStyle.display != "block" ) {
      elemStyle.display = "block"
    } else {
      elemStyle.display = "none"
    }

    return true;
  }
  
  // Make codeblocks hidden by default
  document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
  
  // ]]>
  </script>

</head>
<body>



    <div id="classHeader">
        <table class="header-table">
        <tr class="top-aligned-row">
          <td><strong>Class</strong></td>
          <td class="class-name-in-header">ActiveScaffold::Config::List::UserSettings</td>
        </tr>
        <tr class="top-aligned-row">
            <td><strong>In:</strong></td>
            <td>
                <a href="../../../../files/vendor/plugins/active_scaffold/lib/config/list_rb.html">
                vendor/plugins/active_scaffold/lib/config/list.rb
                </a>
        <br />
            </td>
        </tr>

        <tr class="top-aligned-row">
            <td><strong>Parent:</strong></td>
            <td>
                <a href="UserSettings.html">
                UserSettings
               </a>
            </td>
        </tr>
        </table>
    </div>
  <!-- banner header -->

  <div id="bodyContent">



  <div id="contextContent">



   </div>

    <div id="method-list">
      <h3 class="section-bar">Methods</h3>

      <div class="name-list">
      <a href="#M000118">label</a>&nbsp;&nbsp;
      <a href="#M000120">page</a>&nbsp;&nbsp;
      <a href="#M000121">page=</a>&nbsp;&nbsp;
      <a href="#M000119">per_page</a>&nbsp;&nbsp;
      <a href="#M000122">sorting</a>&nbsp;&nbsp;
      </div>
    </div>

  </div>


    <!-- if includes -->

    <div id="section">





      


    <!-- if method_list -->
    <div id="methods">
      <h3 class="section-bar">Public Instance methods</h3>

      <div id="method-M000118" class="method-detail">
        <a name="M000118"></a>

        <div class="method-heading">
          <a href="#M000118" class="method-signature">
          <span class="method-name">label</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
This <a href="UserSettings.html#M000118">label</a> has alread been
localized.
</p>
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000118-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000118-source">
<pre>
    <span class="ruby-comment cmt"># File vendor/plugins/active_scaffold/lib/config/list.rb, line 67</span>
67:       <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">label</span>
68:         <span class="ruby-ivar">@session</span>[<span class="ruby-identifier">:label</span>] <span class="ruby-operator">?</span> <span class="ruby-ivar">@session</span>[<span class="ruby-identifier">:label</span>] <span class="ruby-operator">:</span> <span class="ruby-ivar">@conf</span>.<span class="ruby-identifier">label</span>
69:       <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000120" class="method-detail">
        <a name="M000120"></a>

        <div class="method-heading">
          <a href="#M000120" class="method-signature">
          <span class="method-name">page</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000120-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000120-source">
<pre>
    <span class="ruby-comment cmt"># File vendor/plugins/active_scaffold/lib/config/list.rb, line 76</span>
76:       <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">page</span>
77:         <span class="ruby-ivar">@session</span>[<span class="ruby-value str">'page'</span>] = <span class="ruby-ivar">@params</span>[<span class="ruby-value str">'page'</span>] <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@params</span>.<span class="ruby-identifier">has_key?</span> <span class="ruby-value str">'page'</span>
78:         <span class="ruby-ivar">@session</span>[<span class="ruby-value str">'page'</span>] <span class="ruby-operator">||</span> <span class="ruby-value">1</span>
79:       <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000121" class="method-detail">
        <a name="M000121"></a>

        <div class="method-heading">
          <a href="#M000121" class="method-signature">
          <span class="method-name">page=</span><span class="method-args">(value = nil)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000121-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000121-source">
<pre>
    <span class="ruby-comment cmt"># File vendor/plugins/active_scaffold/lib/config/list.rb, line 81</span>
81:       <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">page=</span>(<span class="ruby-identifier">value</span> = <span class="ruby-keyword kw">nil</span>)
82:         <span class="ruby-ivar">@session</span>[<span class="ruby-value str">'page'</span>] = <span class="ruby-identifier">value</span>
83:       <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000119" class="method-detail">
        <a name="M000119"></a>

        <div class="method-heading">
          <a href="#M000119" class="method-signature">
          <span class="method-name">per_page</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000119-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000119-source">
<pre>
    <span class="ruby-comment cmt"># File vendor/plugins/active_scaffold/lib/config/list.rb, line 71</span>
71:       <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">per_page</span>
72:         <span class="ruby-ivar">@session</span>[<span class="ruby-value str">'per_page'</span>] = <span class="ruby-ivar">@params</span>[<span class="ruby-value str">'limit'</span>].<span class="ruby-identifier">to_i</span> <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@params</span>.<span class="ruby-identifier">has_key?</span> <span class="ruby-value str">'limit'</span>
73:         <span class="ruby-ivar">@session</span>[<span class="ruby-value str">'per_page'</span>] <span class="ruby-operator">||</span> <span class="ruby-ivar">@conf</span>.<span class="ruby-identifier">per_page</span>
74:       <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000122" class="method-detail">
        <a name="M000122"></a>

        <div class="method-heading">
          <a href="#M000122" class="method-signature">
          <span class="method-name">sorting</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000122-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000122-source">
<pre>
    <span class="ruby-comment cmt"># File vendor/plugins/active_scaffold/lib/config/list.rb, line 85</span>
85:       <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">sorting</span>
86:         <span class="ruby-comment cmt"># we want to store as little as possible in the session, but we want to return a Sorting data structure. so we recreate it each page load based on session data.</span>
87:         <span class="ruby-ivar">@session</span>[<span class="ruby-value str">'sort'</span>] = [<span class="ruby-ivar">@params</span>[<span class="ruby-value str">'sort'</span>], <span class="ruby-ivar">@params</span>[<span class="ruby-value str">'sort_direction'</span>]] <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@params</span>[<span class="ruby-value str">'sort'</span>] <span class="ruby-keyword kw">and</span> <span class="ruby-ivar">@params</span>[<span class="ruby-value str">'sort_direction'</span>]
88:         <span class="ruby-ivar">@session</span>[<span class="ruby-value str">'sort'</span>] = <span class="ruby-keyword kw">nil</span> <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@params</span>[<span class="ruby-value str">'sort_direction'</span>] <span class="ruby-operator">==</span> <span class="ruby-value str">'reset'</span>
89: 
90:         <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@session</span>[<span class="ruby-value str">'sort'</span>]
91:           <span class="ruby-identifier">sorting</span> = <span class="ruby-ivar">@conf</span>.<span class="ruby-identifier">sorting</span>.<span class="ruby-identifier">clone</span>
92:           <span class="ruby-identifier">sorting</span>.<span class="ruby-identifier">set</span>(<span class="ruby-operator">*</span><span class="ruby-ivar">@session</span>[<span class="ruby-value str">'sort'</span>])
93:           <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">sorting</span>
94:         <span class="ruby-keyword kw">else</span>
95:           <span class="ruby-keyword kw">return</span> <span class="ruby-ivar">@conf</span>.<span class="ruby-identifier">sorting</span>
96:         <span class="ruby-keyword kw">end</span>
97:       <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>


    </div>


  </div>


<div id="validator-badges">
  <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
</div>

</body>
</html>